<?php
/* @var $this AdminLogController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Admin Logs',
);

$this->menu=array(
	array('label'=>'Create AdminLog', 'url'=>array('create')),
	array('label'=>'Manage AdminLog', 'url'=>array('admin')),
);
?>
<section class="content-header">
    <h1>
        日志
        <small>Admin Logs</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="<?=$this->createUrl('default/index')?>"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li class="active">日志</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <!-- /.row -->
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">日志</h3>
                    <a class="btn btn-default btn-sm multi-operate" href="<?=$this->createUrl('adminLog/delete')?>" title="删除" data-pjax="0" data-confirm="真的要删除吗？"><i class="fa fa-trash-o"></i> 删除</a>
                    <div class="box-tools">
                        <div class="input-group input-group-sm hidden-xs" style="width: 150px;">
                            <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">
                            <div class="input-group-btn">
                                <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body table-responsive no-padding">
                    <table class="table table-hover">
                        <tr>
                            <th width="20" class="text-center"><input type="checkbox" name="selection_all" id="selection_all" class="icheckbox_minimal-blue"></th>
                            <th width="150">序号</th>
                            <th width="150">管理员</th>
                            <th width="150" class="text-center">路由</th>
                            <th width="" class="text-center">描述</th>
                            <th width="130" class="text-center">创建时间</th>
                            <th width="140" class="text-center">操作</th>
                        </tr>
                        <?php foreach ($list as $key=>$data){?>
                            <tr>
                                <td class="text-center"><input type="checkbox" class="icheckbox_minimal-blue" name="selection[]" value="<?=$data->id?>"></td>
                                <td><?php echo CHtml::encode($data->id); ?></td>
                                <td><?php echo CHtml::encode($data->adminUser->username); ?></td>
                                <td class="text-center"><?php echo $data->route; ?></td>
                                <td class="text-center"><?php echo $data->description; ?></td>
                                <td><?php echo date('Y-m-d H:i',$data->created_at); ?></td>
                                <td>
                                    <a href="<?=$this->createUrl('view',array('id'=>$data->id))?>" class="btn btn-sm btn-default"><i class="fa fa-eye"></i> 查看</a>
                                    <a href="<?=$this->createUrl('delete',array('id'=>$data->id))?>" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i> 删除</a>
                                </td>
                            </tr>
                        <?php }?>
                    </table>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <div class="pull-left">
                        共 <?=$count?> 条数据
                    </div>
                    <div class="pull-right">
                        <?php $this->widget('CLinkPager', array(
                                'pages' => $pages,
                                'selectedPageCssClass' => 'active', //当前页的class
                                'hiddenPageCssClass' => 'disabled', //禁用页的class
                                'header' => '', //分页前显示的内容
                                'maxButtonCount' => 10, //显示分页数量
                                'htmlOptions' => array('class' => 'pagination','style'=>'margin:0;'),
                                'firstPageLabel' => '首页',
                                'nextPageLabel' => '下一页',
                                'prevPageLabel' => '上一页',
                                'lastPageLabel' => '末页',
                            )
                        );?>
                    </div>

                </div><!-- /.box-footer -->
            </div>
            <!-- /.box -->
        </div>
    </div>
</section>
<!-- /.content -->